<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimpleWindow: Dictionary.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SimpleWindow
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('_dictionary_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">Dictionary.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#include &quot;Utils.h&quot;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="keyword">namespace </span>sw</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span>{</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> TKey, <span class="keyword">typename</span> TVal&gt;</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span>    <span class="keyword">class </span>Dictionary; <span class="comment">// 向前声明</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> TVal&gt;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span>    <span class="keyword">using </span>StrDictionary = Dictionary&lt;std::wstring, TVal&gt;;</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> TKey, <span class="keyword">typename</span> TVal&gt;</div>
<div class="foldopen" id="foldopen00023" data-start="{" data-end="};">
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html">   23</a></span>    <span class="keyword">class </span><a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>    {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>    <span class="keyword">private</span>:</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>        std::shared_ptr&lt;std::map&lt;TKey, TVal&gt;&gt; _pMap;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    <span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00035" data-start="{" data-end="}">
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a77cbfe628092b74f1a698e7b5fe56c69">   35</a></span>        <a class="code hl_function" href="classsw_1_1_dictionary.html#a77cbfe628092b74f1a698e7b5fe56c69">Dictionary</a>()</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>            : _pMap(<a class="code hl_class" href="classsw_1_1_dictionary.html">new</a> std::<a class="code hl_class" href="classsw_1_1_dictionary.html">map</a>&lt;<a class="code hl_class" href="classsw_1_1_dictionary.html">TKey</a>, <a class="code hl_class" href="classsw_1_1_dictionary.html">TVal</a>&gt;)</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>        {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>        }</div>
</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="foldopen" id="foldopen00043" data-start="{" data-end="}">
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a178b607824a4eff707914f2eb3aaaa22">   43</a></span>        <a class="code hl_function" href="classsw_1_1_dictionary.html#a178b607824a4eff707914f2eb3aaaa22">Dictionary</a>(std::initializer_list&lt;std::pair&lt;const TKey, TVal&gt;&gt; <a class="code hl_class" href="classsw_1_1_dictionary.html">list</a>)</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>            : <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a>()</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>        {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>            this-&gt;_pMap-&gt;insert(<a class="code hl_class" href="classsw_1_1_dictionary.html">list</a>);</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>        }</div>
</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="foldopen" id="foldopen00052" data-start="{" data-end="}">
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a9e7e3d687118005beb08bbf9e3a3a2bc">   52</a></span>        <span class="keyword">auto</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a9e7e3d687118005beb08bbf9e3a3a2bc">begin</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;<a class="code hl_function" href="classsw_1_1_dictionary.html#a9e7e3d687118005beb08bbf9e3a3a2bc">begin</a>();</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>        }</div>
</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="foldopen" id="foldopen00060" data-start="{" data-end="}">
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a98945b3a8a7c6b3e1110a406718a49c8">   60</a></span>        <span class="keyword">auto</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a98945b3a8a7c6b3e1110a406718a49c8">end</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;<a class="code hl_function" href="classsw_1_1_dictionary.html#a98945b3a8a7c6b3e1110a406718a49c8">end</a>();</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>        }</div>
</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span> </div>
<div class="foldopen" id="foldopen00068" data-start="{" data-end="}">
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#aad835fe48c0fccba0e7e99001c7f3de6">   68</a></span>        <span class="keyword">auto</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#aad835fe48c0fccba0e7e99001c7f3de6">rbegin</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;<a class="code hl_function" href="classsw_1_1_dictionary.html#aad835fe48c0fccba0e7e99001c7f3de6">rbegin</a>();</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>        }</div>
</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
<div class="foldopen" id="foldopen00076" data-start="{" data-end="}">
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#ab46b8829980f88dd6fe703d4d2961773">   76</a></span>        <span class="keyword">auto</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#ab46b8829980f88dd6fe703d4d2961773">rend</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;<a class="code hl_function" href="classsw_1_1_dictionary.html#ab46b8829980f88dd6fe703d4d2961773">rend</a>();</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>        }</div>
</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="foldopen" id="foldopen00085" data-start="{" data-end="}">
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a3f2f6938ef081002887f747d74950a30">   85</a></span>        <span class="keyword">auto</span> &amp;<a class="code hl_function" href="classsw_1_1_dictionary.html#a3f2f6938ef081002887f747d74950a30">operator[]</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">TKey</a> &amp;key)<span class="keyword"> const</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;operator[](key);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>        }</div>
</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span> </div>
<div class="foldopen" id="foldopen00093" data-start="{" data-end="};">
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#aa139d8b586f45b45157b268832ac9522">   93</a></span>        <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code hl_friend" href="classsw_1_1_dictionary.html#aa139d8b586f45b45157b268832ac9522">operator==</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> &amp;left, <span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> &amp;right)</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>        {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>            <span class="keywordflow">return</span> left._pMap == right._pMap;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>        }</div>
</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span> </div>
<div class="foldopen" id="foldopen00101" data-start="{" data-end="};">
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a9d62c349f91ea2d17e49c9f424e522da">  101</a></span>        <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code hl_friend" href="classsw_1_1_dictionary.html#a9d62c349f91ea2d17e49c9f424e522da">operator!=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> &amp;left, <span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> &amp;right)</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>        {</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>            <span class="keywordflow">return</span> left._pMap != right._pMap;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>        }</div>
</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="foldopen" id="foldopen00109" data-start="{" data-end="};">
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a09fce0167bbe5ff0e080de8b1a52e286">  109</a></span>        <span class="keyword">friend</span> std::wostream &amp;<a class="code hl_friend" href="classsw_1_1_dictionary.html#a09fce0167bbe5ff0e080de8b1a52e286">operator&lt;&lt;</a>(std::wostream &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">wos</a>, <span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">dic</a>)</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>        {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>            <a class="code hl_class" href="classsw_1_1_dictionary.html">wos</a> &lt;&lt; <a class="code hl_function" href="classsw_1_1_utils.html#abb9a32e7b7d1fb83832c9a39a84c3452">Utils::BuildStr</a>(*<a class="code hl_class" href="classsw_1_1_dictionary.html">dic</a>._pMap);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>            <span class="keywordflow">return</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a77cbfe628092b74f1a698e7b5fe56c69">wos</a>;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>        }</div>
</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span> </div>
<div class="foldopen" id="foldopen00118" data-start="{" data-end="}">
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a7c16eced6a889e97f4a1807697090fd3">  118</a></span>        <span class="keywordtype">int</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a7c16eced6a889e97f4a1807697090fd3">Count</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>            <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)this-&gt;_pMap-&gt;size();</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>        }</div>
</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span> </div>
<div class="foldopen" id="foldopen00126" data-start="{" data-end="}">
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a16703bd325716445121e257ae489dcc4">  126</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a16703bd325716445121e257ae489dcc4">IsEmpty</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;empty();</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>        }</div>
</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
<div class="foldopen" id="foldopen00135" data-start="{" data-end="}">
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a726bccc37022c21d7864673c69138acc">  135</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a726bccc37022c21d7864673c69138acc">ContainsKey</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">TKey</a> &amp;key)<span class="keyword"> const</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>            <span class="keywordflow">return</span> this-&gt;_pMap-&gt;count(key);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>        }</div>
</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="foldopen" id="foldopen00144" data-start="{" data-end="}">
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#afc07e417b7ccc36dc5a7dab5018b6186">  144</a></span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#afc07e417b7ccc36dc5a7dab5018b6186">Remove</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">TKey</a> &amp;key)<span class="keyword"> const</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>            this-&gt;_pMap-&gt;erase(key);</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>        }</div>
</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
<div class="foldopen" id="foldopen00152" data-start="{" data-end="}">
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#a061c70ddd433b90b5d8b61a9c81fc8da">  152</a></span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a061c70ddd433b90b5d8b61a9c81fc8da">Clear</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>            this-&gt;_pMap-&gt;clear();</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>        }</div>
</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span> </div>
<div class="foldopen" id="foldopen00160" data-start="{" data-end="}">
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="classsw_1_1_dictionary.html#afa7a405134901716b4affecc9f01df0f">  160</a></span>        <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> <a class="code hl_function" href="classsw_1_1_dictionary.html#afa7a405134901716b4affecc9f01df0f">Copy</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>            <a class="code hl_class" href="classsw_1_1_dictionary.html">Dictionary</a> <a class="code hl_function" href="classsw_1_1_dictionary.html#a77cbfe628092b74f1a698e7b5fe56c69">dic</a>;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>            <a class="code hl_class" href="classsw_1_1_dictionary.html">dic</a>._pMap-&gt;insert(this-&gt;_pMap-&gt;begin(), <a class="code hl_class" href="classsw_1_1_dictionary.html">this</a>-&gt;_pMap-&gt;end());</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>            <span class="keywordflow">return</span> <a class="code hl_function" href="classsw_1_1_dictionary.html#a77cbfe628092b74f1a698e7b5fe56c69">dic</a>;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>        }</div>
</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>    };</div>
</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>}</div>
<div class="ttc" id="aclasssw_1_1_dictionary_html"><div class="ttname"><a href="classsw_1_1_dictionary.html">sw::Dictionary</a></div><div class="ttdoc">字典类，内部维护了一个指向std::map的智能指针</div><div class="ttdef"><b>Definition</b> Dictionary.h:24</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a061c70ddd433b90b5d8b61a9c81fc8da"><div class="ttname"><a href="classsw_1_1_dictionary.html#a061c70ddd433b90b5d8b61a9c81fc8da">sw::Dictionary::Clear</a></div><div class="ttdeci">void Clear() const</div><div class="ttdoc">清空字典</div><div class="ttdef"><b>Definition</b> Dictionary.h:152</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a09fce0167bbe5ff0e080de8b1a52e286"><div class="ttname"><a href="classsw_1_1_dictionary.html#a09fce0167bbe5ff0e080de8b1a52e286">sw::Dictionary::operator&lt;&lt;</a></div><div class="ttdeci">friend std::wostream &amp; operator&lt;&lt;(std::wostream &amp;wos, const Dictionary &amp;dic)</div><div class="ttdoc">支持Utils::BuildStr</div><div class="ttdef"><b>Definition</b> Dictionary.h:109</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a16703bd325716445121e257ae489dcc4"><div class="ttname"><a href="classsw_1_1_dictionary.html#a16703bd325716445121e257ae489dcc4">sw::Dictionary::IsEmpty</a></div><div class="ttdeci">bool IsEmpty() const</div><div class="ttdoc">字典是否为空</div><div class="ttdef"><b>Definition</b> Dictionary.h:126</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a178b607824a4eff707914f2eb3aaaa22"><div class="ttname"><a href="classsw_1_1_dictionary.html#a178b607824a4eff707914f2eb3aaaa22">sw::Dictionary::Dictionary</a></div><div class="ttdeci">Dictionary(std::initializer_list&lt; std::pair&lt; const TKey, TVal &gt; &gt; list)</div><div class="ttdoc">使用初始化列表</div><div class="ttdef"><b>Definition</b> Dictionary.h:43</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a3f2f6938ef081002887f747d74950a30"><div class="ttname"><a href="classsw_1_1_dictionary.html#a3f2f6938ef081002887f747d74950a30">sw::Dictionary::operator[]</a></div><div class="ttdeci">auto &amp; operator[](const TKey &amp;key) const</div><div class="ttdoc">获取或设置值</div><div class="ttdef"><b>Definition</b> Dictionary.h:85</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a726bccc37022c21d7864673c69138acc"><div class="ttname"><a href="classsw_1_1_dictionary.html#a726bccc37022c21d7864673c69138acc">sw::Dictionary::ContainsKey</a></div><div class="ttdeci">bool ContainsKey(const TKey &amp;key) const</div><div class="ttdoc">是否存在某个键值</div><div class="ttdef"><b>Definition</b> Dictionary.h:135</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a77cbfe628092b74f1a698e7b5fe56c69"><div class="ttname"><a href="classsw_1_1_dictionary.html#a77cbfe628092b74f1a698e7b5fe56c69">sw::Dictionary::Dictionary</a></div><div class="ttdeci">Dictionary()</div><div class="ttdoc">初始化字典</div><div class="ttdef"><b>Definition</b> Dictionary.h:35</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a7c16eced6a889e97f4a1807697090fd3"><div class="ttname"><a href="classsw_1_1_dictionary.html#a7c16eced6a889e97f4a1807697090fd3">sw::Dictionary::Count</a></div><div class="ttdeci">int Count() const</div><div class="ttdoc">获取键值对个数</div><div class="ttdef"><b>Definition</b> Dictionary.h:118</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a98945b3a8a7c6b3e1110a406718a49c8"><div class="ttname"><a href="classsw_1_1_dictionary.html#a98945b3a8a7c6b3e1110a406718a49c8">sw::Dictionary::end</a></div><div class="ttdeci">auto end() const</div><div class="ttdoc">正向迭代器结束</div><div class="ttdef"><b>Definition</b> Dictionary.h:60</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a9d62c349f91ea2d17e49c9f424e522da"><div class="ttname"><a href="classsw_1_1_dictionary.html#a9d62c349f91ea2d17e49c9f424e522da">sw::Dictionary::operator!=</a></div><div class="ttdeci">friend bool operator!=(const Dictionary &amp;left, const Dictionary &amp;right)</div><div class="ttdoc">判断是否不是同一个字典</div><div class="ttdef"><b>Definition</b> Dictionary.h:101</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_a9e7e3d687118005beb08bbf9e3a3a2bc"><div class="ttname"><a href="classsw_1_1_dictionary.html#a9e7e3d687118005beb08bbf9e3a3a2bc">sw::Dictionary::begin</a></div><div class="ttdeci">auto begin() const</div><div class="ttdoc">正向迭代器开始</div><div class="ttdef"><b>Definition</b> Dictionary.h:52</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_aa139d8b586f45b45157b268832ac9522"><div class="ttname"><a href="classsw_1_1_dictionary.html#aa139d8b586f45b45157b268832ac9522">sw::Dictionary::operator==</a></div><div class="ttdeci">friend bool operator==(const Dictionary &amp;left, const Dictionary &amp;right)</div><div class="ttdoc">判断是否为同一个字典</div><div class="ttdef"><b>Definition</b> Dictionary.h:93</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_aad835fe48c0fccba0e7e99001c7f3de6"><div class="ttname"><a href="classsw_1_1_dictionary.html#aad835fe48c0fccba0e7e99001c7f3de6">sw::Dictionary::rbegin</a></div><div class="ttdeci">auto rbegin() const</div><div class="ttdoc">反向迭代器开始</div><div class="ttdef"><b>Definition</b> Dictionary.h:68</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_ab46b8829980f88dd6fe703d4d2961773"><div class="ttname"><a href="classsw_1_1_dictionary.html#ab46b8829980f88dd6fe703d4d2961773">sw::Dictionary::rend</a></div><div class="ttdeci">auto rend() const</div><div class="ttdoc">反向迭代器结束</div><div class="ttdef"><b>Definition</b> Dictionary.h:76</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_afa7a405134901716b4affecc9f01df0f"><div class="ttname"><a href="classsw_1_1_dictionary.html#afa7a405134901716b4affecc9f01df0f">sw::Dictionary::Copy</a></div><div class="ttdeci">Dictionary Copy() const</div><div class="ttdoc">复制当前字典</div><div class="ttdef"><b>Definition</b> Dictionary.h:160</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html_afc07e417b7ccc36dc5a7dab5018b6186"><div class="ttname"><a href="classsw_1_1_dictionary.html#afc07e417b7ccc36dc5a7dab5018b6186">sw::Dictionary::Remove</a></div><div class="ttdeci">void Remove(const TKey &amp;key) const</div><div class="ttdoc">移除指定键值对</div><div class="ttdef"><b>Definition</b> Dictionary.h:144</div></div>
<div class="ttc" id="aclasssw_1_1_utils_html_abb9a32e7b7d1fb83832c9a39a84c3452"><div class="ttname"><a href="classsw_1_1_utils.html#abb9a32e7b7d1fb83832c9a39a84c3452">sw::Utils::BuildStr</a></div><div class="ttdeci">static std::wstring BuildStr(const Args &amp;...args)</div><div class="ttdoc">拼接字符串，也可使用此函数将其他类型转为wstring</div><div class="ttdef"><b>Definition</b> Utils.h:87</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_01fcd3835fb4e7d9331b722d86291b65.html">sw</a></li><li class="navelem"><a class="el" href="dir_ed5f6ece24ffcc4307a76d27c2494db3.html">inc</a></li><li class="navelem"><b>Dictionary.h</b></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
